package com.qst.order.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qst.order.domain.DTO.*;
import com.qst.order.domain.OrderItem;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

public interface OrderItemService extends IService<OrderItem> {


    /**
     * 获取指定日期范围内的订单商品明细
     * @param start 开始时间
     * @param end 结束时间
     * @param merchantId 商家ID（当前登录商家）
     * @return 订单商品明细DTO列表
     */
    public List<OrderItemDTO> getOrderItemList(LocalDate start, LocalDate  end, Integer merchantId);


    OverviewDTO getOverview(LocalDate  start, LocalDate  end, Integer merchantId);

    TrendDTO getTrend(LocalDate  start, LocalDate  end, Integer merchantId);

    StatusDistributionDTO getOrderStatusDistribution(LocalDate  start, LocalDate  end, Integer merchantId);

    List<TopProductDTO> getTopProducts(LocalDate  start, LocalDate  end,
                                       Integer merchantId, Integer topN);
}
